import request from "../../http";

const commentApi = {
  async getCommentData(query) {
    return request({
      url: "/api/comments/list",
      method: "get",
      params: query
    });
  },
  async queryCommentData(query) {
    return request({
      url: "/api/comments/list",
      method: "get",
      params: query
    });
  },
  async getCommentDetail(commentId) {
    return request({
      url: `/api/comments/${commentId}`,
      method: "get"
    });
  },
  async reply(params) {
    return request({
      url: "/api/comments",
      method: "put",
      data: params
    });
  },
  async getFormData(query) {
    return request({
      url: "/api/comments/listGroup",
      method: "get",
      params: query
    });
  },
  async getCommentCount(query) {
    return request({
      url: "/api/comments/listCommentCount",
      method: "get",
      params: query
    });
  },
  async getGoodsComment(query) {
    return request({
      url: "/api/comments/listGoodCount",
      method: "get",
      params: query
    });
  }
};

export default commentApi;
